import 'dart:convert' show json;

class HomeHotGoodsResult {

  bool success;
  String code;
  String message;
  HomeHotGoodsResultEntity entity;

  HomeHotGoodsResult.fromParams({this.success, this.code, this.message, this.entity});

  factory HomeHotGoodsResult(jsonStr) => jsonStr == null ? null : jsonStr is String ? new HomeHotGoodsResult.fromJson(json.decode(jsonStr)) : new HomeHotGoodsResult.fromJson(jsonStr);

  HomeHotGoodsResult.fromJson(jsonRes) {
    success = jsonRes['success'];
    code = jsonRes['code'];
    message = jsonRes['message'];
    entity = jsonRes['entity'] == null ? null : new HomeHotGoodsResultEntity.fromJson(jsonRes['entity']);
  }

  @override
  String toString() {
    return '{"success": $success,"code": ${code != null?'${json.encode(code)}':'null'},"message": ${message != null?'${json.encode(message)}':'null'},"entity": $entity}';
  }
}

class HomeHotGoodsResultEntity {

  HomeHotGoodsSearchResponse goods_search_response;

  HomeHotGoodsResultEntity.fromParams({this.goods_search_response});

  HomeHotGoodsResultEntity.fromJson(jsonRes) {
    goods_search_response = jsonRes['goods_search_response'] == null ? null : new HomeHotGoodsSearchResponse.fromJson(jsonRes['goods_search_response']);
  }

  @override
  String toString() {
    return '{"goods_search_response": $goods_search_response}';
  }
}

class HomeHotGoodsSearchResponse {

  int total_count;
  List<HotGoodsBean> goods_list;

  HomeHotGoodsSearchResponse.fromParams({this.total_count, this.goods_list});

  HomeHotGoodsSearchResponse.fromJson(jsonRes) {
    total_count = jsonRes['total_count'];
    goods_list = jsonRes['goods_list'] == null ? null : [];

    for (var goods_listItem in goods_list == null ? [] : jsonRes['goods_list']){
      goods_list.add(goods_listItem == null ? null : new HotGoodsBean.fromJson(goods_listItem));
    }
  }

  @override
  String toString() {
    return '{"total_count": $total_count,"goods_list": $goods_list}';
  }
}

class HotGoodsBean {

  Object avg_desc;
  Object avg_desc_text;
  Object avg_lgst;
  Object avg_lgst_text;
  Object avg_serv;
  Object avg_serv_text;
  Object detail_url;
  Object goods_gallery_urls;
  Object jsonString;
  Object share_info;
  int awardAmount;
  int category_id;
  int coupon_discount;
  int coupon_end_time;
  int coupon_price;
  int coupon_remain_quantity;
  int coupon_start_time;
  int coupon_total_quantity;
  int goods_id;
  int id;
  int mall_id;
  int min_group_price;
  int plusAmount;
  int promotion_rate;
  int sold_quantity;
  int sort;
  int state;
  int subject_id;
  bool has_coupon;
  String activity_type;
  String activityid;
  String coupon_condition;
  String coupon_url;
  String goods_desc;
  String goods_desc_short;
  String goods_image_url;
  String goods_name;
  String guide_article;
  String mall_desc;
  String mall_name;
  String mall_type;
  String modify_time;

  HotGoodsBean.fromParams({this.avg_desc, this.avg_desc_text, this.avg_lgst, this.avg_lgst_text, this.avg_serv, this.avg_serv_text, this.detail_url, this.goods_gallery_urls, this.jsonString, this.share_info, this.awardAmount, this.category_id, this.coupon_discount, this.coupon_end_time, this.coupon_price, this.coupon_remain_quantity, this.coupon_start_time, this.coupon_total_quantity, this.goods_id, this.id, this.mall_id, this.min_group_price, this.plusAmount, this.promotion_rate, this.sold_quantity, this.sort, this.state, this.subject_id, this.has_coupon, this.activity_type, this.activityid, this.coupon_condition, this.coupon_url, this.goods_desc, this.goods_desc_short, this.goods_image_url, this.goods_name, this.guide_article, this.mall_desc, this.mall_name, this.mall_type, this.modify_time});

  HotGoodsBean.fromJson(jsonRes) {
    avg_desc = jsonRes['avg_desc'];
    avg_desc_text = jsonRes['avg_desc_text'];
    avg_lgst = jsonRes['avg_lgst'];
    avg_lgst_text = jsonRes['avg_lgst_text'];
    avg_serv = jsonRes['avg_serv'];
    avg_serv_text = jsonRes['avg_serv_text'];
    detail_url = jsonRes['detail_url'];
    goods_gallery_urls = jsonRes['goods_gallery_urls'];
    jsonString = jsonRes['jsonString'];
    share_info = jsonRes['share_info'];
    awardAmount = jsonRes['awardAmount'];
    category_id = jsonRes['category_id'];
    coupon_discount = jsonRes['coupon_discount'];
    coupon_end_time = jsonRes['coupon_end_time'];
    coupon_price = jsonRes['coupon_price'];
    coupon_remain_quantity = jsonRes['coupon_remain_quantity'];
    coupon_start_time = jsonRes['coupon_start_time'];
    coupon_total_quantity = jsonRes['coupon_total_quantity'];
    goods_id = jsonRes['goods_id'];
    id = jsonRes['id'];
    mall_id = jsonRes['mall_id'];
    min_group_price = jsonRes['min_group_price'];
    plusAmount = jsonRes['plusAmount'];
    promotion_rate = jsonRes['promotion_rate'];
    sold_quantity = jsonRes['sold_quantity'];
    sort = jsonRes['sort'];
    state = jsonRes['state'];
    subject_id = jsonRes['subject_id'];
    has_coupon = jsonRes['has_coupon'];
    activity_type = jsonRes['activity_type'];
    activityid = jsonRes['activityid'];
    coupon_condition = jsonRes['coupon_condition'];
    coupon_url = jsonRes['coupon_url'];
    goods_desc = jsonRes['goods_desc'];
    goods_desc_short = jsonRes['goods_desc_short'];
    goods_image_url = jsonRes['goods_image_url'];
    goods_name = jsonRes['goods_name'];
    guide_article = jsonRes['guide_article'];
    mall_desc = jsonRes['mall_desc'];
    mall_name = jsonRes['mall_name'];
    mall_type = jsonRes['mall_type'];
    modify_time = jsonRes['modify_time'];
  }

  @override
  String toString() {
    return '{"avg_desc": $avg_desc,"avg_desc_text": $avg_desc_text,"avg_lgst": $avg_lgst,"avg_lgst_text": $avg_lgst_text,"avg_serv": $avg_serv,"avg_serv_text": $avg_serv_text,"detail_url": $detail_url,"goods_gallery_urls": $goods_gallery_urls,"jsonString": $jsonString,"share_info": $share_info,"awardAmount": $awardAmount,"category_id": $category_id,"coupon_discount": $coupon_discount,"coupon_end_time": $coupon_end_time,"coupon_price": $coupon_price,"coupon_remain_quantity": $coupon_remain_quantity,"coupon_start_time": $coupon_start_time,"coupon_total_quantity": $coupon_total_quantity,"goods_id": $goods_id,"id": $id,"mall_id": $mall_id,"min_group_price": $min_group_price,"plusAmount": $plusAmount,"promotion_rate": $promotion_rate,"sold_quantity": $sold_quantity,"sort": $sort,"state": $state,"subject_id": $subject_id,"has_coupon": $has_coupon,"activity_type": ${activity_type != null?'${json.encode(activity_type)}':'null'},"activityid": ${activityid != null?'${json.encode(activityid)}':'null'},"coupon_condition": ${coupon_condition != null?'${json.encode(coupon_condition)}':'null'},"coupon_url": ${coupon_url != null?'${json.encode(coupon_url)}':'null'},"goods_desc": ${goods_desc != null?'${json.encode(goods_desc)}':'null'},"goods_desc_short": ${goods_desc_short != null?'${json.encode(goods_desc_short)}':'null'},"goods_image_url": ${goods_image_url != null?'${json.encode(goods_image_url)}':'null'},"goods_name": ${goods_name != null?'${json.encode(goods_name)}':'null'},"guide_article": ${guide_article != null?'${json.encode(guide_article)}':'null'},"mall_desc": ${mall_desc != null?'${json.encode(mall_desc)}':'null'},"mall_name": ${mall_name != null?'${json.encode(mall_name)}':'null'},"mall_type": ${mall_type != null?'${json.encode(mall_type)}':'null'},"modify_time": ${modify_time != null?'${json.encode(modify_time)}':'null'}}';
  }
}

